/*
 * @Author: 贺楚 2402041262@qq.com
 * @Date: 2023-01-12 09:23:01
 * @LastEditors: 贺楚 2402041262@qq.com
 * @LastEditTime: 2023-01-14 16:13:15
 * @FilePath: \vue-admin-template-master\src\api\permissions.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
//权限api

import request from '@/utils/request'


// 创建权限
export const addPermission = (data) =>request({
  url: '/biz/addPermission',
  method: 'post',
  data
})

// 修改权限
export const updatePermission = (data) =>request({
  url: '/biz/updatePermission',
  method: 'post',
  data
})

// 删除权限
export const deletePermission = (data) =>request({
  url: '/biz/deletePermission',
  method: 'post',
  data
})

// 权限分页
export const pagePermission = (data) =>request({
  url: '/biz/pagePermission',
  method: 'post',
  data
})

// 获取权限
export const getPermission = (data) =>request({
  url: '/biz/getPermission',
  method: 'post',
  data
})

// 获取角色
export const getRoleList = (data) =>request({
  url: '/biz/role/getRoleList',
  method: 'post',
  data
})

// 添加角色
export const addRole = (data) =>request({
  url: '/biz/role/addRole',
  method: 'post',
  data
})

// 修改角色
export const updatePenaltyConfiguration = (data) =>request({
  url: '/biz/role/updatePenaltyConfiguration',
  method: 'post',
  data
})

// 删除角色
export const deleteRole = (data) =>request({
  url: '/biz/role/deleteRole',
  method: 'post',
  data
})

// 添加角色权限
export const addRolePermission = (data) =>request({
  url: '/biz/role/addRolePermission',
  method: 'post',
  data
})

// 获取权限树
export const getRolePermissionList = (data) =>request({
  url: '/biz/getRolePermissionList',
  method: 'post',
  data
})

// 获取角色权限
export const getRolePermission = (data) =>request({
  url: '/biz/role/getRolePermission',
  method: 'post',
  data
})
